1. Field of the Invention
The present invention relates to image processing in which the difference between illuminants in capturing an image is corrected.
2. Description of the Related Art
To transform the colors of an image captured under an illuminant different from a observation light (viewing illuminant) into colors equivalent to those of an image captured under the observation light, it is necessary to perform color correction processing in which color data under the shooting light is transformed into that under the observation light.
A technique of calculating color correction conditions for color transformation has been proposed, although it does not correct the difference between illuminants. With this technique, a color transformation matrix for matching RGB signal values obtained by capturing a color chart with those of target colors obtained from the colorimetric values of the color chart is obtained using the least-squares method.
Upon practical application of the above-mentioned technique, the RGB signal values of representative colors can be sampled from an image captured under an illuminant different from a observation light, and that captured under the observation light to generate color correction conditions.
Also, ununiformity (to be referred to as “ununiformity of light” hereinafter) occurs in the captured image data due to factors associated with, for example, the arrangement of illuminants in capturing an image. When representative colors are sampled from the image data suffering from ununiformity of light to calculate color correction conditions, the color correction accuracy degrades. Therefore, a technique of eliminating ununiformity of light in calculating color correction conditions for correcting the difference between illuminants has also been proposed.
However, in calculating color correction conditions for correcting the difference between illuminants, the color reproducibility and tonality of image data after light-source conversion processing (illuminant transformation processing) may degrade when the colors of an image (to be referred to as a “shooting light image” hereinafter) captured under a shooting light (capturing illuminant) are associated with those of an image (to be referred to as a “observation light image” hereinafter) captured under a observation light using one correction parameter. Especially when, for example, the ununiformity of light of the image is large, or the colors of the image are locally distributed in a specific region, the color reproducibility and tonality of image data after light-source conversion processing considerably degrade.